import java.util.HashSet;

public class student {
    public static void main(String[] args){
        java.util.Set<String> run = new java.util.HashSet<>();
        java.util.Set<String> run2 = new java.util.HashSet<>();
        java.util.Set<String> jump = new java.util.HashSet<>();


        run.add("小S");
        run.add("小A");
        run.add("小D");
        run.add("小W");


        jump.add("小S");
        jump.add("小Q");
        jump.add("小E");
        jump.add("小R");
        jump.add("小F");
        jump.add("小C");
        System.out.println("跑步项目有：" + run);
        System.out.println(run.size() +"同学参加跑步比赛比赛");


        System.out.println("跳绳项目有：" + jump);
        System.out.println(jump.size() +"同学参加跳绳比赛");



        run2.addAll(run);
        run2.addAll(jump);
        System.out.println("\n所有参加项目的同学：" + run2);


        run2.retainAll(run);
        run2.retainAll(jump);
        System.out.println("\n参加两项的同学：" + run2);

        jump.removeAll(run);
        System.out.println("只参加跳绳没跑步的的同学：" + jump);


    }
}
